const db = uniCloud.database();
module.exports = {
	async update(fieldName, dates, id) {
		const dbCmd = db.command;
		return await db.collection('future').where({
			date: dbCmd.in(dates)
		}).update({
			[fieldName]: dbCmd.push(id)
		});
	}
}